package com.xmtlxx.system.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.domain.entity.SysCheckItem;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmtlxx.system.domain.bo.SysCheckItemBo;
import com.xmtlxx.system.domain.vo.SysCheckItemVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 检查项Mapper接口
 *
 * @author xmtlxx
 * @date 2022-04-26
 */
public interface SysCheckItemMapper extends BaseMapperPlus<SysCheckItemMapper, SysCheckItem, SysCheckItemVo> {
    /**
     * 根据条件分页查询检查项
     *
     * @param sysCheckItemBo 检查项
     * @return Page SysCheckItem
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "s.create_by"),
        @DataColumn(key = "deptName", value = "s.create_by"),
        @DataColumn(key = "userName", value = "s.create_by")
    })
    Page<SysCheckItemVo> selectPageSysCheckItemList(@Param("page") Page<SysCheckItem> page,@Param("sysCheckItem") SysCheckItem sysCheckItem);

    /**
     * 查询检查项列表
     *
     * @param sysCheckItemBo 检查项
     * @return 检查项集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "s.create_by"),
        @DataColumn(key = "deptName", value = "s.create_by"),
        @DataColumn(key = "userName", value = "s.create_by")
    })
    List<SysCheckItem> selectSysCheckItemList(SysCheckItemBo sysCheckItem);

}
